<?php

  session_start();
  include "config.php";

  if(isset($_SESSION["user"]))
  {
    include "$header";
    include "$body";

    if(isset($_SESSION["rcep_success"]))
    {
      if(isset($_POST["OK"]))
      {
        echo "<SCRIPT language='Javascript'>";
        echo "  window.location.href = 'recordCustomerEnquiryProblem.php'";
        echo "</SCRIPT>";
      }
      else
      {
?>

<div style="position:absolute; top:0px; left:1px; border:0;">
  <span class="prevPage">Record Customer Enquiry Problem > </span>
  <span class="prevPage">Confirm Details > </span>
  <span class="page">Success</span>
</div>
  
<?php

  include "$H_rcep";

  echo $_SESSION["rcep_staff_no"] . ", you have successfully submitted a customer enquiry problem.";

?>

<p>

<FORM name="ok" action="" method="post">
<input class="submit_off" type="submit" value="OK" name="OK" onmouseover="className='submit_on'" onmouseout="className='submit_off'" />
</FORM>

</CENTER>

</BODY>

<?php
      }
    }
    else
    {
      echo "<SCRIPT language='Javascript'>";
      echo "  window.location.href = 'recordCustomerEnquiryProblem.php'";
      echo "</SCRIPT>";
    }
    unset($_SESSION["rcep_success"]);
    unset($_SESSION["rcep_staff_no"]);
    unset($_SESSION["rcep_enquiry_date"]);
    unset($_SESSION["rcep_prod_no"]);
    unset($_SESSION["rcep_description"]);
    unset($_SESSION["rcep_quantity"]);
	unset($_SESSION["rcep_reason"]);
    unset($_SESSION["rcep_dep_no"]);
    unset($_SESSION["rcep_customer_name"]);
    unset($_SESSION["rcep_customer_no"]);
    include "$footer";
  }
  else
  {
    session_destroy();
    echo "<SCRIPT language='Javascript'>";
    echo "  parent.window.location.href = 'index.php';";
    echo "</SCRIPT>";
  }

?>